home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2000 #5 / Amiga Plus CD - 2000 - No. 5.iso / Tools / Dev / fpc / demos / getfontasl.pas < prev    next >
Pascal/Delphi Source File  |  2000-01-01  |  1KB  |  34 lines

  1. PROGRAM GetFontAsltest;
  2.  
  3. uses easyasl,msgbox,amigautils;
  4.  
  5. {
  6.    An example to get a font with easyasl.
  7.    24 Jan 2000.
  8.  
  9.    nils.sjoholm@mailbox.swipnet.se
  10. }
  11.  
  12. VAR
  13.     myfont : tFPCFontInfo;
  14.     dummy  : BOOLEAN;
  15.  
  16.  
  17. BEGIN
  18.  
  19.     dummy := GetFontAsl('Pick a font',myfont,NIL);
  20.     IF dummy THEN BEGIN
  21.        MessageBox('FPC Pascal Request',
  22.                   'You picked as font   :' + myfont.nfi_Name + #10 +
  23.                   'The fontsize is      :' + longtostr(myfont.nfi_Size) + #10 +
  24.                   'The fontstyle is     :' + longtostr(myfont.nfi_Style) + #10 +
  25.                   'The flags are set to :' + longtostr(myfont.nfi_Flags) + #10 +
  26.                   'Frontpen is number   :' + longtostr(myfont.nfi_FrontPen) + #10 +
  27.                   'And as the backpen   :' + longtostr(myfont.nfi_BackPen) + #10 +
  28.                   'And finally drawmode :' + longtostr(myfont.nfi_DrawMode),
  29.                   'Nice font!');
  30.     END ELSE
  31.        MessageBox('FPC Pascal request','You didn''t pick a font','Why not?');
  32. END.
  33.  
  34.